package cn.com.joycode.nimble.starter.examples;

import cn.com.joycode.nimble.core.utils.ObjectMapperUtil;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

@Data
@Document(indexName = "news", type = "news")
public class News {

    @Id
    private String id;

    private String name;

    private String author;

    @Override
    public String toString() {
        return ObjectMapperUtil.toJsonString(this);
    }
}
